﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Wentong300Cameral
{
    public partial class frmCustomerPlateNumber : Form
    {

        public delegate DialogResult InvokeDelegate(UserControl parent);
        public DialogResult xShowDialog(UserControl parent)
        {
            if (parent.InvokeRequired)
            {
                InvokeDelegate xShow = new InvokeDelegate(xShowDialog);
                parent.Invoke(xShow, new object[] { parent });
                return DialogResult;
            }
            return this.ShowDialog(parent);
        }

        public frmCustomerPlateNumber()
        {
            InitializeComponent();
        }

        private void frmCustomerPlateNumber_Load(object sender, EventArgs e)
        {
            CancelButton = btnCancel;
            AcceptButton = btnOK;
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            GlobalVariable.manualPlateNumber = txtPlateNumber.Text.Trim();
            this.Close();
        }

        private void btnClear_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text = "";
        }

        private void button11_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button5_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button6_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button7_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button8_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button9_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button10_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button12_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button13_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button14_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button15_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button16_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button17_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button18_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button19_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button20_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button21_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button22_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button23_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button24_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button25_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button26_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button27_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button28_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button29_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button30_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button31_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button32_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button33_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button34_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button35_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button36_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button37_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button38_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button39_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button40_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button41_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button42_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button43_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button44_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button45_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button46_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button47_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button48_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button49_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button50_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button51_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button52_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button53_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button54_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button55_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button65_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button66_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button67_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button68_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button69_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button70_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button71_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button72_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button73_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void button74_Click(object sender, EventArgs e)
        {
            txtPlateNumber.Text += ((Button)sender).Text.Trim();
        }

        private void btnBack_Click(object sender, EventArgs e)
        {
            string old = txtPlateNumber.Text.Trim();
            if(old != "")
            {
                txtPlateNumber.Text = old.Substring(0, old.Length -1);
            }            
        }
    }
}
